﻿/*******************************************************************************
#                    BulletinEntity.cs
#  Comment:
#
#  Current Version: V1.0
#  Author: 
#
#  History List:
#  V1.0    Created by Onions@2009-8-18 20:07:18
#
#******************************************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using IBatisNet.Extend;

namespace ExpertMIS.Entities
{

    /// <summary><c>BulletinEntity</c> Business Object.</summary>
    [Serializable]
    public class BulletinEntity : BaseEntity
    {
        #region Constructor

        public BulletinEntity()
        {
            // construct your entity
        }

        #endregion

        #region Properties

        #region OID

        private String m_oID;

        /// <summary>Gets or sets OID</summary>
        public String OID
        {
            get { return m_oID; }
            set { m_oID = value; }
        }

        #endregion

        #region Bulletin

        private String m_bulletin;

        /// <summary>Gets or sets Bulletin</summary>
        public String Bulletin
        {
            get { return m_bulletin; }
            set { m_bulletin = value; }
        }

        #endregion

        #region Abstract

        private String m_abstract;

        /// <summary>Gets or sets Abstract</summary>
        public String Abstract
        {
            get { return m_abstract; }
            set { m_abstract = value; }
        }

        #endregion

        #region Context

        private String m_context;

        /// <summary>Gets or sets Context</summary>
        public String Context
        {
            get { return m_context; }
            set { m_context = value; }
        }

        #endregion

        #region Sort

        private Int32? m_sort;

        /// <summary>Gets or sets Sort</summary>
        public Int32? Sort
        {
            get { return m_sort; }
            set { m_sort = value; }
        }

        #endregion

        #region CreateDate

        private DateTime m_createDate;

        /// <summary>Gets or sets CreateDate</summary>
        public DateTime CreateDate
        {
            get { return m_createDate; }
            set { m_createDate = value; }
        }

        #endregion

        #region UpdateDate

        private DateTime? m_updateDate;

        /// <summary>Gets or sets UpdateDate</summary>
        public DateTime? UpdateDate
        {
            get { return m_updateDate; }
            set { m_updateDate = value; }
        }

        #endregion

        #region Enabled

        private Boolean m_enabled;

        /// <summary>Gets or sets Enabled</summary>
        public Boolean Enabled
        {
            get { return m_enabled; }
            set { m_enabled = value; }
        }

        public string GetOutputText(string WebRoot)
        {
            string windowOpenScript = string.Format("window.open('{1}ViewBulletin.aspx?oid={0}','_blank','location=no,resizable=no,width=320,height=300');", m_oID, WebRoot);
            return string.Format("<a href='#' onclick=\"{0}\">{1}</a>|[{2:D}]", windowOpenScript, m_bulletin, m_updateDate);
        }

        #endregion

        #region BulletinZone

        private string m_bulletinzone;

        public String BulletinZone
        {
            get { return m_bulletinzone; }
            set { m_bulletinzone = value;}
        }

        #endregion
        #endregion
    }
}
